package cn.itsource.article.mapper;

import cn.itsource.article.domain.Article;
import cn.itsource.article.query.ArticleQuery;
import cn.itsource.article.vo.ArticleVo;

import java.util.List;

/**
* @author DELL
* @description 针对表【tb_article(文章信息表)】的数据库操作Mapper
* @createDate 2024-06-05 18:07:02
* @Entity cn.itsource.article.domain.Article
*/
public interface ArticleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKey(Article record);

    /**
     * 查询列表 根据查询条件
     * @param articleQuery
     * @return
     */
    List<Article> selectAllByQuery(ArticleQuery articleQuery);

    void deleteByConllection(List<Article> articles);

    /**
     * 对文章类型进行分组统计
     * @return
     */
    List<ArticleVo> group();

    /**
     * 归档时间 用时间进行分组
     * @return
     */
    List<ArticleVo> createGroup();

    /**
     * 查询相关文章
     * @return
     */
    List<Article> selectAboutArticleByArticleId(Long articleId);


    void addNum(String articleId);


    void addWarch(String articleId);



    List<Article> getList();
}
